Skip to content

feat(superposition): integrate /sdk-configs endpoint for dynamic field rendering#112

Open
Pradeep-kumar1202 wants to merge 1 commit into
mainfrom
superposition-phase-1
Open

feat(superposition): integrate /sdk-configs endpoint for dynamic field rendering#112
Pradeep-kumar1202 wants to merge 1 commit into
mainfrom
superposition-phase-1

Conversation

@Pradeep-kumar1202

@Pradeep-kumar1202 Pradeep-kumar1202 commented May 1, 2026

Copy link
Copy Markdown
Contributor

Summary :

  1. Phase 1 of Superposition integration. The SDK now fetches a dynamic field configuration from the new BE /v1/sdk/configs/{profile_id}/web/{env}.json endpoint at session init, and uses it to render payment method fields.
  • New : hyperswitch-sdk-android-superposition Gradle module exposing SuperpositionManager (singleton).
  • On PaymentSession.create, initialise(host, profileId, apiKey) + fire-and-forget fetchConfig().
  • On presentSheet, the cached raw JSON is injected into props.hyperParams.superpositionConfigRaw for the JS bundle to consume.
  • Moves HyperNetworking from :logger to :common and adds makeGetRequest.

@Pradeep-kumar1202 Pradeep-kumar1202 force-pushed the superposition-phase-1 branch from 8a61784 to 9eee128 Compare May 1, 2026 16:28
@Pradeep-kumar1202 Pradeep-kumar1202 changed the title feat: adding superposition support to the SDK feat(superposition): integrate /sdk-configs endpoint for dynamic field rendering May 1, 2026
result.onSuccess { json ->
if (json.isNotBlank()) {
cachedConfig = SuperpositionConfig(configJson = json)
Log.d(TAG, "Config fetched successfully")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Logs will be removed post testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant